HAL PSSI types migration

This section provides information about the HAL PSSI types migration.

HAL PSSI callback ID type definition

HAL1

HAL2

typedef enum
{
  HAL_PSSI_ABORT_CB_ID,
  HAL_PSSI_ERROR_CB_ID,
  HAL_PSSI_MSPDEINIT_CB_ID,
  HAL_PSSI_MSPINIT_CB_ID,
  HAL_PSSI_RX_COMPLETE_CB_ID,
  HAL_PSSI_TX_COMPLETE_CB_ID
} HAL_PSSI_CallbackIDTypeDef;
  • Removed from HAL2 : the callback registration is managed by dedicated functions for each pssi event. For more details, refer to : HAL PSSI register callback

  • HAL_PSSI_MSPINIT_CB_ID and HAL_PSSI_MSPDEINIT_CB_ID are removed because the functions HAL_PSSI_MspInit() and HAL_PSSI_MspDeInit() are removed.

Related concepts:


HAL PSSI callback type definition

HAL1

HAL2

pPSSI_CallbackTypeDef
hal_pssi_cb_t

Related concept: Replaced TypeDef suffix with _t in type names


HAL PSSI state type definition

HAL1

HAL2

typedef enum
{
  HAL_PSSI_STATE_RESET,

  HAL_PSSI_STATE_READY,
  HAL_PSSI_STATE_BUSY,
  HAL_PSSI_STATE_BUSY_TX,
  HAL_PSSI_STATE_BUSY_RX,
  HAL_PSSI_STATE_ABORT,


  HAL_PSSI_STATE_ERROR,
  HAL_PSSI_STATE_TIMEOUT
 } HAL_PSSI_StateTypeDef;
typedef enum
{
  HAL_PSSI_STATE_RESET,
  HAL_PSSI_STATE_INIT, /* New state to indicate that the peripheral is initialized */
  HAL_PSSI_STATE_IDLE,

  HAL_PSSI_STATE_TX,
  HAL_PSSI_STATE_RX,
  HAL_PSSI_STATE_ABORT
} hal_pssi_state_t;

Related concept: Revised and optimized HAL state machine


HAL PSSI handle type definition

HAL1

HAL2

PSSI_HandleTypeDef
hal_pssi_handle_t

Related concept: Renaming of the handle structure


HAL PSSI initialization type definition

HAL1

HAL2

 typedef struct
{
  uint32_t  BusWidth;
  uint32_t  ControlSignal;
  uint32_t  DataEnablePolarity;
  uint32_t  ReadyPolarity;
  uint32_t  DataWidth;
  uint32_t  ClockPolarity;
} PSSI_InitTypeDef;
 typedef struct
{
  hal_pssi_bus_width_t             bus_width_line;
  hal_pssi_control_signal_t        control_signal;
  hal_pssi_data_enable_polarity_t  data_enable_polarity;
  hal_pssi_ready_polarity_t        ready_polarity;
  hal_pssi_data_width_t            data_width_bit;
  hal_pssi_clock_polarity_t        clock_polarity;
} hal_pssi_config_t;